package ysq.xyg.shop.service;

import ysq.xyg.base.model.dto.ReturnEntity;
import ysq.xyg.base.service.BaseService;
import ysq.xyg.shop.model.po.ShopAddress;
import ysq.xyg.sys.model.po.SysUser;
import ysq.xyg.shop.model.vo.ShopAddressVo;

import java.util.List;

/**
 * 商城模块-用户地址service接口
 *
 * @author congcong tao
 * @date 2019-5-27 7:34:48
 */
public interface ShopAddressService extends BaseService<ShopAddress> {

    /**
     * 分页查询
     *
     * @param shopAddressVo 对象
     * @param pageSize 当前页面
     * @param pageNum 页面数量
     * @return ReturnEntity 对象
     * @author congcong tao
     * @date 2019-5-27 7:34:48
     */
    ReturnEntity page(ShopAddressVo shopAddressVo, int pageSize, int pageNum);

    /**
     * 修改
     *
     * @param shopAddressVo 对象
     * @param currentUser 当前用户
     * @return ReturnEntity 对象
     * @author congcong tao
     * @date 2019-5-27 7:34:48
     */
    ReturnEntity addOrUpdate(ShopAddressVo shopAddressVo, SysUser currentUser);

    /**
     * 删除
     *
     * @param id 主键id删除
     * @param currentUser 当前用户
     * @return ReturnEntity 对象
     * @author congcong tao
     * @date 2019-5-27 7:34:48
     */
    ReturnEntity delete(String id, SysUser currentUser);

    /**
     * 获取集合
     *
     * @param shopAddressVo 对象
     * @return List<ShopAddress> ShopAddress集合
     * @author congcong tao
     * @date 2019-5-27 7:34:48
     */
    List<ShopAddress> acceptList(ShopAddressVo shopAddressVo);

    ReturnEntity setAddressDefault(String memberId, String addressId);

    ReturnEntity updateOrAddAddress(ShopAddressVo shopAddressVo);
}
